package entity;

import lombok.Data;

import java.util.Map;

@Data
public class UserEntity {
    private String id;

    private String username;

    private String password;

    public static UserEntity mapToEntity(Map<String,Object> objectMap) {
        UserEntity user = new UserEntity();
        user.setId((String) objectMap.get("id"));
        user.setUsername((String) objectMap.get("username"));
        user.setPassword((String) objectMap.get("password"));
        return user;
    }
}
